<template>
    <div class="bananer">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(imgs, index) of bananer" :key="index">
                <img :src="imgs.image_url" alt="" />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
    import { getHomelist } from "../api/api";
    export default {
        name: 'YxBaner',
        data() {
            return {
                bananer: [],
            };
        },
        created() {
            getHomelist()
                .then((res) => {
                    this.bananer = res.data.banner;
                   // console.log(res);
                })
                .catch((err) => {
                    console.log(err);
                });
        },
        mounted() {

        },

        methods: {

        },
    };
</script>

<style lang="scss" scoped>
 /* 轮播 */
.my-swipe /deep/.van-swipe__indicator {
        width: 1rem;
        height: .04rem;
}
</style>
